package com.fast.log;

import ch.qos.logback.classic.pattern.MessageConverter;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.classic.spi.LoggingEvent;

public class TracerLoggerMessageConverter extends MessageConverter {

    @Override
    public String convert(ILoggingEvent event) {
        if (event instanceof LoggingEvent) {
            LoggingEvent e = (LoggingEvent) event;
            return TraceLoggerHandler.getMessage(e);
        }
        return event.getMessage();
    }
}
